using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Extraction
{
    /// <summary>
    /// <para>Extract Values to Points</para>
    /// <para>Extracts the cell values of a raster based on a set of point features and records the values in the attribute table of an output feature class.</para>
    /// <para>根据一组点要素提取栅格的像元值，并将这些值记录在输出要素类的属性表中。</para>
    /// </summary>    
    [DisplayName("Extract Values to Points")]
    public class ExtractValuesToPoints : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExtractValuesToPoints()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_point_features">
        /// <para>Input point features</para>
        /// <para>The input point features defining the locations from which you want to extract the raster cell values.</para>
        /// <para>输入点要素用于定义要从中提取栅格像元值的位置。</para>
        /// </param>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para><xdoc>
        ///   <para>The raster dataset whose values will be extracted.</para>
        ///   <para>It can be an integer or floating-point type raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将提取其值的栅格数据集。</para>
        ///   <para>它可以是整数或浮点类型栅格。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_point_features">
        /// <para>Output point features</para>
        /// <para>The output point feature dataset containing the extracted raster values.</para>
        /// <para>包含提取栅格值的输出点要素数据集。</para>
        /// </param>
        public ExtractValuesToPoints(object _in_point_features, object _in_raster, object _out_point_features)
        {
            this._in_point_features = _in_point_features;
            this._in_raster = _in_raster;
            this._out_point_features = _out_point_features;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Extract Values to Points";

        public override string CallName => "sa.ExtractValuesToPoints";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "maintainSpatialIndex", "mask", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "scratchWorkspace", "transferDomains", "workspace"];

        public override object[] ParameterInfo => [_in_point_features, _in_raster, _out_point_features, _interpolate_values.GetGPValue(), _add_attributes.GetGPValue()];

        /// <summary>
        /// <para>Input point features</para>
        /// <para>The input point features defining the locations from which you want to extract the raster cell values.</para>
        /// <para>输入点要素用于定义要从中提取栅格像元值的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input point features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_point_features { get; set; }


        /// <summary>
        /// <para>Input raster</para>
        /// <para><xdoc>
        ///   <para>The raster dataset whose values will be extracted.</para>
        ///   <para>It can be an integer or floating-point type raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将提取其值的栅格数据集。</para>
        ///   <para>它可以是整数或浮点类型栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output point features</para>
        /// <para>The output point feature dataset containing the extracted raster values.</para>
        /// <para>包含提取栅格值的输出点要素数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output point features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_point_features { get; set; }


        /// <summary>
        /// <para>Interpolate values at the point locations</para>
        /// <para><xdoc>
        ///   <para>Specifies whether interpolation will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—No interpolation will be applied; the value of the cell center will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The value of the cell will be calculated from the adjacent cells with valid values using bilinear interpolation. NoData values will be ignored in the interpolation unless all adjacent cells are NoData.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否使用插值。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不应用插值;将使用单元中心的值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 将使用双线性插值从具有有效值的相邻像元计算像元的值。除非所有相邻单元格都是 NoData，否则插值中将忽略 NoData 值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Interpolate values at the point locations")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _interpolate_values_value _interpolate_values { get; set; } = _interpolate_values_value._false;

        public enum _interpolate_values_value
        {
            /// <summary>
            /// <para>NONE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>INTERPOLATE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INTERPOLATE")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Append all the input raster attributes to the output point features</para>
        /// <para><xdoc>
        ///   <para>Determines if the raster attributes are written to the output point feature dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Only the value of the input raster is added to the point attributes. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—All the fields from the input raster (except Count) will be added to the point attributes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否将栅格属性写入输出点要素数据集。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 仅将输入栅格的值添加到点属性中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 输入栅格中的所有字段（计数除外）都将添加到点属性中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Append all the input raster attributes to the output point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _add_attributes_value _add_attributes { get; set; } = _add_attributes_value._false;

        public enum _add_attributes_value
        {
            /// <summary>
            /// <para>VALUE_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("VALUE_ONLY")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>ALL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALL")]
            [GPEnumValue("true")]
            _true,

        }

        public ExtractValuesToPoints SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, bool? maintainSpatialIndex = null, object mask = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, bool? transferDomains = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, maintainSpatialIndex: maintainSpatialIndex, mask: mask, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, transferDomains: transferDomains, workspace: workspace);
            return this;
        }

    }

}